package com.example.myapplication1;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ArrayAapterActivity extends AppCompatActivity {

    public ListView mListView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_array_adpter);

        mListView=findViewById(R.id.listview1);

        String[] data = {"sjshd","swirid","qwzp",
                "sjshd1","swirid1","qwzp1",
                "sjshd2","swirid2","qwzp2",
                "sjshd3","swirid3","qwzp3",
                "sjshd4","swirid4","qwzp4",
                "sjshd5","swirid5","qwzp5",
                "sjshd6","swirid6","qwzp6"};

        ArrayAdapter adapter = new ArrayAdapter(this,R.layout.arrayadapter_item,data);

        mListView.setAdapter(adapter);
    }
}